﻿@model RewardPointsSettingsModel
@using Nop.Core.Domain.Orders;
@{
    //page title
    ViewBag.Title = T("Admin.Configuration.Settings.RewardPoints").Text;
}
@using (Html.BeginForm())
{
    <div class="section-header">
        <div class="title">
            <img src="@Url.Content("~/Administration/Content/images/ico-configuration.png")" alt="" />
            @T("Admin.Configuration.Settings.RewardPoints")
        </div>
        <div class="options">
            <input type="submit" name="save" class="t-button" value="@T("Admin.Common.Save")" />
        </div>
    </div>
    @Html.Action("StoreScopeConfiguration", "Setting")
    @Html.ValidationSummary(false)
    <table class="adminContent">
        <tr>
            <td class="adminTitle" colspan="2">
                @T("Admin.Configuration.Settings.RewardPoints.Description")
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.Enabled_OverrideForStore, model => model.Enabled, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.Enabled):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Enabled)
                @Html.ValidationMessageFor(model => model.Enabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.ExchangeRate_OverrideForStore, model => model.ExchangeRate, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.ExchangeRate):
            </td>
            <td class="adminData">
                @T("Admin.Configuration.Settings.RewardPoints.ExchangeRate.Hint2")
                @Html.EditorFor(model => model.ExchangeRate)
                @Model.PrimaryStoreCurrencyCode
                @Html.ValidationMessageFor(model => model.ExchangeRate)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.MinimumRewardPointsToUse_OverrideForStore, model => model.MinimumRewardPointsToUse, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.MinimumRewardPointsToUse):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.MinimumRewardPointsToUse)
                @Html.ValidationMessageFor(model => model.MinimumRewardPointsToUse)
            </td>
        </tr>
        <tr class="adminSeparator">
            <td colspan="2">
                <hr />
                @T("Admin.Configuration.Settings.RewardPoints.Earning")
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.PointsForRegistration_OverrideForStore, model => model.PointsForRegistration, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.PointsForRegistration):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.PointsForRegistration)
                @Html.ValidationMessageFor(model => model.PointsForRegistration)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.PointsForPurchases_OverrideForStore, model => model.PointsForPurchases_Amount, model => model.PointsForPurchases_Points, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.PointsForPurchases_Amount):
            </td>
            <td class="adminData">
                @T("Admin.Configuration.Settings.RewardPoints.Earning.Hint1")
                @Html.EditorFor(model => model.PointsForPurchases_Amount)
                @Model.PrimaryStoreCurrencyCode
                &nbsp;
                @T("Admin.Configuration.Settings.RewardPoints.Earning.Hint2")
                @Html.EditorFor(model => model.PointsForPurchases_Points)
                @T("Admin.Configuration.Settings.RewardPoints.Earning.Hint3")
                @Html.ValidationMessageFor(model => model.PointsForPurchases_Amount)
                @Html.ValidationMessageFor(model => model.PointsForPurchases_Points)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.PointsForPurchases_Awarded_OverrideForStore, model => model.PointsForPurchases_Awarded, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.PointsForPurchases_Awarded):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.PointsForPurchases_Awarded, ((OrderStatus)Model.PointsForPurchases_Awarded).ToSelectList())
                @Html.ValidationMessageFor(model => model.PointsForPurchases_Awarded)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.PointsForPurchases_Canceled_OverrideForStore, model => model.PointsForPurchases_Canceled, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.PointsForPurchases_Canceled):
            </td>
            <td class="adminData">
                @Html.DropDownListFor(model => model.PointsForPurchases_Canceled, ((OrderStatus)Model.PointsForPurchases_Canceled).ToSelectList())
                @Html.ValidationMessageFor(model => model.PointsForPurchases_Canceled)
            </td>
        </tr>
    </table>
}